package com.example.victory.swagger.model;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;

/**
 * 客户信息
 */
@ApiModel(description = "客户信息")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-04-26T10:50:39.083+08:00")

public class ContractExpire   {
  @JsonProperty("name")
  private String name = null;

  @JsonProperty("customerId")
  private String customerId = null;

  @JsonProperty("phone")
  private String phone = null;

  @JsonProperty("imId")
  private String imId = null;

  @JsonProperty("details")
  @Valid
  private List<KeyValueDetail> details = null;

  public ContractExpire name(String name) {
    this.name = name;
    return this;
  }

  /**
   * 客户姓名
   * @return name
  **/
  @ApiModelProperty(example = "张三", value = "客户姓名")


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public ContractExpire customerId(String customerId) {
    this.customerId = customerId;
    return this;
  }

  /**
   * 客户号
   * @return customerId
  **/
  @ApiModelProperty(example = "12345623", value = "客户号")


  public String getCustomerId() {
    return customerId;
  }

  public void setCustomerId(String customerId) {
    this.customerId = customerId;
  }

  public ContractExpire phone(String phone) {
    this.phone = phone;
    return this;
  }

  /**
   * 客户手机号码
   * @return phone
  **/
  @ApiModelProperty(example = "13739036666", value = "客户手机号码")


  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public ContractExpire imId(String imId) {
    this.imId = imId;
    return this;
  }

  /**
   * 发消息用的imId
   * @return imId
  **/
  @ApiModelProperty(example = "13739036666", value = "发消息用的imId")


  public String getImId() {
    return imId;
  }

  public void setImId(String imId) {
    this.imId = imId;
  }

  public ContractExpire details(List<KeyValueDetail> details) {
    this.details = details;
    return this;
  }

  public ContractExpire addDetailsItem(KeyValueDetail detailsItem) {
    if (this.details == null) {
      this.details = new ArrayList<KeyValueDetail>();
    }
    this.details.add(detailsItem);
    return this;
  }

  /**
   * 附加信息
   * @return details
  **/
  @ApiModelProperty(value = "附加信息")

  @Valid

  public List<KeyValueDetail> getDetails() {
    return details;
  }

  public void setDetails(List<KeyValueDetail> details) {
    this.details = details;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ContractExpire contractExpire = (ContractExpire) o;
    return Objects.equals(this.name, contractExpire.name) &&
        Objects.equals(this.customerId, contractExpire.customerId) &&
        Objects.equals(this.phone, contractExpire.phone) &&
        Objects.equals(this.imId, contractExpire.imId) &&
        Objects.equals(this.details, contractExpire.details);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, customerId, phone, imId, details);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ContractExpire {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    customerId: ").append(toIndentedString(customerId)).append("\n");
    sb.append("    phone: ").append(toIndentedString(phone)).append("\n");
    sb.append("    imId: ").append(toIndentedString(imId)).append("\n");
    sb.append("    details: ").append(toIndentedString(details)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

